3.23 \(\int \frac{x^2 (A+B x)}{\sqrt{a+b x^2}} \, dx\)

Optimal. Leaf size=81 \[ -\frac{a A \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}-\frac{\sqrt{a+b x^2} (4 a B-3 A b x)}{6 b^2}+\frac{B x^2 \sqrt{a+b x^2}}{3 b} \]

[Out]

(B*x^2*Sqrt[a + b*x^2])/(3*b) - ((4*a*B - 3*A*b*x)*Sqrt[a + b*x^2])/(6*b^2) - (a
*A*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*b^(3/2))

_______________________________________________________________________________________

Rubi [A]  time = 0.169885, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ -\frac{a A \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 b^{3/2}}-\frac{\sqrt{a+b x^2} (4 a B-3 A b x)}{6 b^2}+\frac{B x^2 \sqrt{a+b x^2}}{3 b} \]

Antiderivative was successfully verified.

[In]  Int[(x^2*(A + B*x))/Sqrt[a + b*x^2],x]

[Out]

(B*x^2*Sqrt[a + b*x^2])/(3*b) - ((4*a*B - 3*A*b*x)*Sqrt[a + b*x^2])/(6*b^2) - (a
*A*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*b^(3/2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 14.7248, size = 73, normalized size = 0.9 \[ - \frac{A a \operatorname{atanh}{\left (\frac{\sqrt{b} x}{\sqrt{a + b x^{2}}} \right )}}{2 b^{\frac{3}{2}}} + \frac{B x^{2} \sqrt{a + b x^{2}}}{3 b} - \frac{\sqrt{a + b x^{2}} \left (- 3 A b x + 4 B a\right )}{6 b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(B*x+A)/(b*x**2+a)**(1/2),x)

[Out]

-A*a*atanh(sqrt(b)*x/sqrt(a + b*x**2))/(2*b**(3/2)) + B*x**2*sqrt(a + b*x**2)/(3
*b) - sqrt(a + b*x**2)*(-3*A*b*x + 4*B*a)/(6*b**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0677468, size = 67, normalized size = 0.83 \[ \frac{\sqrt{a+b x^2} (b x (3 A+2 B x)-4 a B)-3 a A \sqrt{b} \log \left (\sqrt{b} \sqrt{a+b x^2}+b x\right )}{6 b^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(x^2*(A + B*x))/Sqrt[a + b*x^2],x]

[Out]

(Sqrt[a + b*x^2]*(-4*a*B + b*x*(3*A + 2*B*x)) - 3*a*A*Sqrt[b]*Log[b*x + Sqrt[b]*
Sqrt[a + b*x^2]])/(6*b^2)

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 75, normalized size = 0.9 \[{\frac{Ax}{2\,b}\sqrt{b{x}^{2}+a}}-{\frac{Aa}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){b}^{-{\frac{3}{2}}}}+{\frac{B{x}^{2}}{3\,b}\sqrt{b{x}^{2}+a}}-{\frac{2\,Ba}{3\,{b}^{2}}\sqrt{b{x}^{2}+a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(B*x+A)/(b*x^2+a)^(1/2),x)

[Out]

1/2*A*x/b*(b*x^2+a)^(1/2)-1/2*A*a/b^(3/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))+1/3*B*x^
2*(b*x^2+a)^(1/2)/b-2/3*B*a/b^2*(b*x^2+a)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*x^2/sqrt(b*x^2 + a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.266668, size = 1, normalized size = 0.01 \[ \left [\frac{3 \, A a b \log \left (2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right ) + 2 \,{\left (2 \, B b x^{2} + 3 \, A b x - 4 \, B a\right )} \sqrt{b x^{2} + a} \sqrt{b}}{12 \, b^{\frac{5}{2}}}, -\frac{3 \, A a b \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) -{\left (2 \, B b x^{2} + 3 \, A b x - 4 \, B a\right )} \sqrt{b x^{2} + a} \sqrt{-b}}{6 \, \sqrt{-b} b^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*x^2/sqrt(b*x^2 + a),x, algorithm="fricas")

[Out]

[1/12*(3*A*a*b*log(2*sqrt(b*x^2 + a)*b*x - (2*b*x^2 + a)*sqrt(b)) + 2*(2*B*b*x^2
 + 3*A*b*x - 4*B*a)*sqrt(b*x^2 + a)*sqrt(b))/b^(5/2), -1/6*(3*A*a*b*arctan(sqrt(
-b)*x/sqrt(b*x^2 + a)) - (2*B*b*x^2 + 3*A*b*x - 4*B*a)*sqrt(b*x^2 + a)*sqrt(-b))
/(sqrt(-b)*b^2)]

_______________________________________________________________________________________

Sympy [A]  time = 4.99128, size = 94, normalized size = 1.16 \[ \frac{A \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2 b} - \frac{A a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 b^{\frac{3}{2}}} + B \left (\begin{cases} - \frac{2 a \sqrt{a + b x^{2}}}{3 b^{2}} + \frac{x^{2} \sqrt{a + b x^{2}}}{3 b} & \text{for}\: b \neq 0 \\\frac{x^{4}}{4 \sqrt{a}} & \text{otherwise} \end{cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(B*x+A)/(b*x**2+a)**(1/2),x)

[Out]

A*sqrt(a)*x*sqrt(1 + b*x**2/a)/(2*b) - A*a*asinh(sqrt(b)*x/sqrt(a))/(2*b**(3/2))
 + B*Piecewise((-2*a*sqrt(a + b*x**2)/(3*b**2) + x**2*sqrt(a + b*x**2)/(3*b), Ne
(b, 0)), (x**4/(4*sqrt(a)), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.226875, size = 82, normalized size = 1.01 \[ \frac{1}{6} \, \sqrt{b x^{2} + a}{\left ({\left (\frac{2 \, B x}{b} + \frac{3 \, A}{b}\right )} x - \frac{4 \, B a}{b^{2}}\right )} + \frac{A a{\rm ln}\left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{2 \, b^{\frac{3}{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*x^2/sqrt(b*x^2 + a),x, algorithm="giac")

[Out]

1/6*sqrt(b*x^2 + a)*((2*B*x/b + 3*A/b)*x - 4*B*a/b^2) + 1/2*A*a*ln(abs(-sqrt(b)*
x + sqrt(b*x^2 + a)))/b^(3/2)